﻿<div class="main">
    <table border=0 cellpadding=0 cellspacing=0 class="tb-head  form-group-sm">
        <tr>
            <td align="right">
                <div class="form-inline">
                    <select name="memberGroupId" id="memberGroupId" class="form-control ui-queryString ui-selectBind ui-queryString-search" data-source="@Html.GetCanAdminMemberGroupListJson()">
                        <option value="">所有会员组</option>
                    </select>
                    <select name="departmentId" id="departmentId" class="form-control ui-queryString ui-selectBind ui-queryString-search" data-source="@Html.GetDepartmentListJson()" data-custom-params="isTree:true,onlySelectFinal:true">
                        <option value="">所有部门</option>
                    </select>
                    <input type="text" name="username" id="username" style="width:120px;" placeholder="请输入用户名查询" class="form-control ui-queryString ui-keyword" />
                    <button type="button" class="btn btn-default btn-sm ui-queryString-search display-inline">搜索</button>
                </div>
            </td>
        </tr>
    </table>
    <table border=0 cellpadding=0 cellspacing=0 class="table table-bordered" id="tb_list">
        <thead>
            <tr>
                <td align="center" style="width:60px">选择<input type="checkbox" title="选择" class="ui-selectInvert hidden" data-custom-params="isReverse:false"></td>
                <td align="center">用户名</td>
            </tr>
        </thead>
        <tr class="item tem" id="item_{id}">
            <td align="center"><input type="checkbox" value="{Id}" data-input-value="{Username}" class="checked-item"></td>
            <td align="left">
                <div class="dropdown dropdown-hover">
                    <a class="dropdown-toggle" data-toggle="dropdown">
                        <span>{username}</span><span class="is_admin_{isAdmin}" title="管理员" style="color:#999999"></span>
                        <span class="caret"></span>
                    </a>
                    <div class="dropdown-menu item-detail" role="menu">
                        <table class="table" style="width:400px">
                            <tr>
                                <td>会员Id：{Id}</td>
                            </tr>
                            <tr>
                                <td>会员组：<span class="sp_member_type">{MemberGroupId}</span></td>
                                <td>部门：<span class="sp_department">{DepartmentId}</span></td>
                            </tr>
                            <tr>
                                <td>Email：{Email}</td>
                                <td>手机：{Mobile}</td>
                            </tr>
                        </table>
                    </div>
                </div>
            </td>
        </tr>
    </table>
    <div class="submit-footerbar">
        <label class="control-label"></label>
        <div class="controls">
            <button type="button" class="btn btn-primary btn-sm ui-closeDialog">确定</button>
            <button type="button" class="btn btn-sm btn-default ui-closeDialog">关闭</button>
        </div>
    </div>
</div>

<script type="text/javascript">
    function LoadedInit()
    {
        $(".sp_member_type").ConvertText({ valueField: "Id", textField: "Name" }, $("#memberGroupId").attr("data-source"));
        $(".sp_department").ConvertText({ emptyStr: "/" }, $("#departmentId").attr("data-source"));
        $(".dropdown-hover").DropdownHover();
        SetSelectedDisabled();
    }
    function LoadData() {
        var ajaxUrl = "@Url.ActionUrl("PageListData")?_isload=1"
        $("#tb_list").ListBind({url:ajaxUrl,callBack: "LoadedInit" });
    }
    LoadData();
</script>
<script src="/Js/selectData.js" type="text/javascript"></script>
